<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<title>测一测最符合你的电影角色</title>
		<script src="{:config('public.static')}/home/js/base.js"></script>
		<link rel="stylesheet" type="text/css" href="{:config('public.static')}/home/css/base.css" />
		<link rel="stylesheet" href="{:config('public.static')}/home/css/index.css" />
	</head>

	<body>
		<div style="width: 100%;height: 100%; position: absolute; z-index: -1;">
			<img src="{:config('public.static')}/home/img/indexBg.jpg" style="width: 100%; height: 100%;" />
		</div>
		<div class="content">
			<div class="name clearfix">
				<label class="lf">昵&nbsp;&nbsp;称：</label>
				<input class="lf" id="nameInput" type="" name="" id="" value="" />
			</div>
			<div class="sex clearfix">
				<label class="lf">性&nbsp;&nbsp;别：</label>
				<div class="box clearfix lf">
					<div class="female lf" id="femaleShow">
						<img src="{:config('public.static')}/home/img/female.png" />
					</div>
					<div class="male lf">
						<img src="{:config('public.static')}/home/img/male.png" />
					</div>
				</div>
			</div>
			
			<button class="button">查看结果</button>
		</div>

		<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
		<script type="text/javascript">
			$(".box .male").click(function() {
				$(this).attr("id", "maleShow")
				$(this).siblings().removeAttr("id", "femaleShow")
			})
			$(".box .female").click(function() {
				$(this).attr("id", "femaleShow")
				$(this).siblings().removeAttr("id", "maleShow")
			})
			$(".button").click(function() {
				var value = $("#nameInput").val();
                if(value == ""){
                    alert("请输入你的昵称")
                    return
                }
				sessionStorage["par1"] = value
				if($('.box .male').attr('id') == "maleShow") {
					window.location.href = 'boy'
					console.log(258)
				}
				if($('.box .female').attr('id') == "femaleShow") {
					window.location.href = 'girl'
					console.log(146)
				}
			})
		</script>
	</body>

</html>